﻿import request from '/@/utils/request';
enum Api {
  AddInformation = '/api/information/add',
  DeleteInformation = '/api/information/delete',
  UpdateInformation = '/api/information/update',
  PageInformation = '/api/information/page',
  DetailInformation = '/api/information/detail',
  GetClassifyCIdDropdown = '/api/information/ClassifyCIdDropdown',
}

// 增加信息发布
export const addInformation = (params?: any) =>
	request({
		url: Api.AddInformation,
		method: 'post',
		data: params,
	});

// 删除信息发布
export const deleteInformation = (params?: any) => 
	request({
			url: Api.DeleteInformation,
			method: 'post',
			data: params,
		});

// 编辑信息发布
export const updateInformation = (params?: any) => 
	request({
			url: Api.UpdateInformation,
			method: 'post',
			data: params,
		});

// 分页查询信息发布
export const pageInformation = (params?: any) => 
	request({
			url: Api.PageInformation,
			method: 'post',
			data: params,
		});

// 详情信息发布
export const detailInformation = (id: any) => 
	request({
			url: Api.DetailInformation,
			method: 'get',
			data: { id },
		});

export const getClassifyCIdDropdown = () =>
		request({
		url: Api.GetClassifyCIdDropdown,
		method: 'get'
		});

